package com.hsgene.order.dto;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.hsgene.common.util.date.TimeJsonDeserializer;
import com.hsgene.user.dto.address.ConsignAddressDto;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 总订单信息Dto
 *
 * @author wangbing
 * @version 1.0, 2018/8/3
 */
public class OrderMallDto implements Serializable {

    private static final long serialVersionUID = 8202921838208855742L;
    /**
     * 总订单id
     */
    private String id;

    /**
     * 用户id
     */
    private String userId;

    /**
     * 订单来源：APP、WEB、小程序...
     */
    private String from;

    /**
     * 总订单的商品总数
     */
    private Integer goodsTotal;

    /**
     * 订单总金额
     */
    private BigDecimal totalAmount;

    /**
     * 订单优惠总金额
     */
    private BigDecimal totalDiscountsAmount;

    /**
     * 订单实际待支付金额
     */
    private BigDecimal totalRealAmount;

    /**
     * 订单已支付金额
     */
    private BigDecimal paidAmount;

    /**
     * 支付方式
     */
    private String payType;

    /**
     * 投递类型-投递时间段选择
     */
    private String deliveryType;

    /**
     * 材料申请编号（耗材物流寄送信息由耗材模块管理）
     */
    private String materialApplyNo;

    /**
     * 省级id
     */
    private Long province;

    /**
     * 省名
     */
    private String provinceName;

    /**
     * 市级id
     */
    private Long city;

    /**
     * 市名
     */
    private String cityName;

    /**
     * 区县级id
     */
    private Long county;

    /**
     * 区县名
     */
    private String countyName;

    /**
     * 详细地址
     */
    private String address;

    /**
     * 收货人姓名
     */
    private String consigneeName;

    /**
     * 收货人电话
     */
    private String consigneePhone;

    /**
     * 是否需要开具发票
     */
    private Boolean needInvoice;

    /**
     * 是否有效
     */
    private Boolean available;

    /**
     * 订单状态
     */
    private String status;

    /**
     * 订单状态描述
     */
    private String statusDesc;

    /**
     * 截止日期，时间戳
     */
    private Long deadline;

    /**
     * 创建时间
     */
    @JsonDeserialize(using = TimeJsonDeserializer.class)
    private Date createTime;

    /**
     * 更新时间
     */
    @JsonDeserialize(using = TimeJsonDeserializer.class)
    private Date updateTime;

    /**
     * 用户收货地址信息
     */
    private ConsignAddressDto consignAddress;

    /**
     * 子订单列表
     */
    private List<OrderMallItemDto> orderItems;

    /**
     * 总订单的优惠信息
     */
    private List<OrderMallDiscountDto> discounts;

    /**
     * 订单发票信息
     */
    private OrderMallInvoiceDto invoice;

    /**
     * 判断总订单中的子订单数量是否大于2（>=2值为1，否则值为0）
     */
    private Integer itemType;

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getCountyName() {
        return countyName;
    }

    public void setCountyName(String countyName) {
        this.countyName = countyName;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalDiscountsAmount() {
        return totalDiscountsAmount;
    }

    public void setTotalDiscountsAmount(BigDecimal totalDiscountsAmount) {
        this.totalDiscountsAmount = totalDiscountsAmount;
    }

    public BigDecimal getTotalRealAmount() {
        return totalRealAmount;
    }

    public void setTotalRealAmount(BigDecimal totalRealAmount) {
        this.totalRealAmount = totalRealAmount;
    }

    public BigDecimal getPaidAmount() {
        return paidAmount;
    }

    public void setPaidAmount(BigDecimal paidAmount) {
        this.paidAmount = paidAmount;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public String getDeliveryType() {
        return deliveryType;
    }

    public void setDeliveryType(String deliveryType) {
        this.deliveryType = deliveryType;
    }

    public String getMaterialApplyNo() {
        return materialApplyNo;
    }

    public void setMaterialApplyNo(String materialApplyNo) {
        this.materialApplyNo = materialApplyNo;
    }

    public Long getProvince() {
        return province;
    }

    public void setProvince(Long province) {
        this.province = province;
    }

    public Long getCity() {
        return city;
    }

    public void setCity(Long city) {
        this.city = city;
    }

    public Long getCounty() {
        return county;
    }

    public void setCounty(Long county) {
        this.county = county;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getConsigneeName() {
        return consigneeName;
    }

    public void setConsigneeName(String consigneeName) {
        this.consigneeName = consigneeName;
    }

    public String getConsigneePhone() {
        return consigneePhone;
    }

    public void setConsigneePhone(String consigneePhone) {
        this.consigneePhone = consigneePhone;
    }

    public Boolean getNeedInvoice() {
        return needInvoice;
    }

    public void setNeedInvoice(Boolean needInvoice) {
        this.needInvoice = needInvoice;
    }

    public Boolean getAvailable() {
        return available;
    }

    public void setAvailable(Boolean available) {
        this.available = available;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public List<OrderMallItemDto> getOrderItems() {
        return orderItems;
    }

    public void setOrderItems(List<OrderMallItemDto> orderItems) {
        this.orderItems = orderItems;
    }

    public List<OrderMallDiscountDto> getDiscounts() {
        return discounts;
    }

    public void setDiscounts(List<OrderMallDiscountDto> discounts) {
        this.discounts = discounts;
    }

    public OrderMallInvoiceDto getInvoice() {
        return invoice;
    }

    public void setInvoice(OrderMallInvoiceDto invoice) {
        this.invoice = invoice;
    }

    public Integer getGoodsTotal() {
        return goodsTotal;
    }

    public void setGoodsTotal(Integer goodsTotal) {
        this.goodsTotal = goodsTotal;
    }

    public Integer getItemType() {
        return itemType;
    }

    public void setItemType(Integer itemType) {
        this.itemType = itemType;
    }

    public Long getDeadline() {
        return deadline;
    }

    public void setDeadline(Long deadline) {
        this.deadline = deadline;
    }

    public String getStatusDesc() {
        return statusDesc;
    }

    public void setStatusDesc(String statusDesc) {
        this.statusDesc = statusDesc;
    }

    public ConsignAddressDto getConsignAddress() {
        return consignAddress;
    }

    public void setConsignAddress(ConsignAddressDto consignAddress) {
        this.consignAddress = consignAddress;
    }
}
